package com.itheima.day14.atom.test1;

public class MyAtomThread implements Runnable {
    private int count;
    private Object obj = new Object();
    @Override
    public void run() {
        synchronized(obj){
            for (int i = 0; i < 100; i++) {
                System.out.println(++count);
            }
        }
    }
}
